<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'userSelfInfo.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	</head>
	<body>
		<div id="userInfo">
			<html:form action="userAction.do" method="post">
				<fieldset>
					<legend>
						用户列表
					</legend>
					<table border="0" width="100%">
						<tr>
							<logic:present name="userList" scope="request">
								<p>
									<logic:notMatch name="userList" property="firstPage"
										value="true">
										<html:link href="userAction.do?method=previousPage">[上一页]</html:link>
									</logic:notMatch>
									<logic:notMatch name="userList" property="lastPage"
										value="true">
										<html:link href="userAction.do?method=nextPage">[下一页]</html:link>
									</logic:notMatch>
									总共${ userList.pageCount} 页,当前第${userList.page+1
									}页,每页显示${userList.pageSize}条数据
								</p>
							</logic:present>
							<table border="1" width="930" height="117">
								<colgroup>
									<col>
									<col align="char" char=".">
								<thead>
									<tr>
										<th>
											用户名称
										<th>
											真实姓名
										<th>
											Email
										<th>
											电话
										<th>
											注册时间
										<th>
											全选
								<tbody>
									<logic:present name="userList" scope="request">??
										<logic:iterate id="userInfo" collection="${userList.pageList}">
											<tr>
												<td>
													<html:link
														href="userAction.do?method=toCheckUserInfo&userID=${userInfo.userID}"
														property="userLink">${userInfo.userName}</html:link>
												<td>
													${userInfo.userRealName}
												<td>
													${userInfo.userEmail}
												<td>
													${userInfo.userTelephone}
												<td>
													${userInfo.userRegTime}
												<td>
													<html:hidden property="userID" value="${userInfo.userID}" />
										</logic:iterate>
									</logic:present>
							</table>

						</tr>
						<tr>
							<td></td>
							<td>
								<html:submit value="確定" />
								<html:button property="cancel" value="取消" />
							</td>
						</tr>
					</table>
				</fieldset>
				<input type="hidden" name="method" value="deleteUser" />
			</html:form>
		</div>
	</body>
</html>